//
//  TupianTableViewCell.swift
//  新闻
//
//  Created by 芮京 on 2018/12/12.
//  Copyright © 2018 芮京. All rights reserved.
//

import UIKit

class TupianTableViewCell: UITableViewCell {

    @IBOutlet weak var img: UIImageView!
    @IBOutlet weak var Zlabel: UILabel!
    @IBOutlet weak var Dianzan: UILabel!
    @IBOutlet weak var Pinglun: UILabel!
    @IBOutlet weak var Bofang: UILabel!
    //方法
    func Tupian(model:TupianModel) {
        let Pname = model.dicP
        //赋值
        //图片
        let PstrImagV =  Pname!["clientcover1"]
        let PurlStr = NSURL(string:PstrImagV as! String)
        let Pdata = NSData(contentsOf: PurlStr! as URL)
        self.img.image = UIImage(data: Pdata! as Data)
        
        
        self.Zlabel.text = (Pname!["setname"] as! String)
        let PnameString2 = (Pname!["imgsum"] as! String)
        self.Dianzan.text = NSString(format: "点赞:%@", PnameString2) as String
        let PnameString3 = (Pname!["replynum"] as! String)
        self.Pinglun.text = NSString(format: "%@评论", PnameString3) as String
        let PnameString4 = (Pname!["setid"] as! String)
        self.Bofang.text = NSString(format: "播放: %@", PnameString4) as String
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
